﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace PlaytimeSaveTypes
{
    public struct JointData
    {
        public string Name;
        public Vector2 relativeTranslation;
        public float relativeRotation;

        public JointData(string _name, float _relativeRotation, Vector2 _relativeTranslation)
        {
            relativeRotation = _relativeRotation;
            relativeTranslation = _relativeTranslation;
            Name = _name;
        }
    }

    public class JointSaveData
    {
        public string ParentName;
        public JointData data;
        public SpriteSaveData sprite;

        public JointSaveData()
        {

        }
    }

    [Serializable]
    public class SpriteSaveData
    {
        public string TextureName;
        public Vector2 Scale;
        public Vector2 Offset;
        public float rotOffset;
        public float depth;

        public SpriteSaveData()
        {

        }
    }

    [Serializable]
    public class JointAnimationSaveData
    {
        public float animationLength;
        public float animationSpeed = 1f;

        public List<JointSaveData> joints;
        public SerializableDictionary<float, List<JointData>> keyframes;

        public JointAnimationSaveData()
        {

        }
    }
}
